<template>
  <router-view v-slot="{ Component }">
    <transition name="fade">
      <keep-alive>
        <component
          :is="Component"
          :key="$route.name"
          v-if="$route.meta.keepAlive"
        />
      </keep-alive>
    </transition>
  </router-view>
  <router-view v-if="!$route.meta.keepAlive"></router-view>
</template>

<script>
import { Toast } from 'vant'
export default {
  name: "App",
  setup() {
    Toast.allowMultiple();
    if(localStorage.getItem('car')){
      localStorage.removeItem('car')
    }
  },
};
</script>

<style>
html {
  margin: 0;
  padding: 0;
}
.van-tabs__line {
  z-index: 0 !important;
}
.van-popup {
  background:rgb(209, 170, 170)  !important;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.fade-enter-active {
  transition: opacity 0.5s ease-in;
}
.fade-leave-active {
  transition: opacity 0.3s ease-out;
}
</style>
